package com.easy.frame.servers.sys.client;

import com.easy.frame.base.api.pojo.PageDTO;
import com.easy.frame.base.api.pojo.PageVO;
import com.easy.frame.base.basic.ServiceResponse;
import com.easy.frame.servers.sys.dto.SysDictPageDTO;
import com.easy.frame.servers.sys.entity.SysDict;
import com.easy.frame.servers.sys.vo.SysDictPageVO;
import com.easy.frame.servers.sys.vo.SysDictVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 系统字典开放接口声明类
 *
 * @author zzf
 * @date 2020/7/28 15:03
 */
@FeignClient(value = "sys", contextId = "sysDictClient")
@RequestMapping("/sys-dict")
public interface SysDictClient {


    @PostMapping("/page")
    ServiceResponse<PageVO<SysDictPageVO>> page(@RequestBody PageDTO<SysDictPageDTO> param);

    @GetMapping("/byId")
    ServiceResponse<SysDictVO> getById(@RequestParam Long id,
                                       @RequestParam int language);

    @PostMapping
    ServiceResponse<SysDict> save(@RequestBody SysDict entity);

    @PutMapping("/update")
    ServiceResponse<SysDict> update(@RequestBody SysDict entity);
}
